package faa.expertise.helloadf.view.backing;

import oracle.adf.controller.TaskFlowId;

public class TestTFNavigationBean {
    public static final String START_TASK_FLOW =
        "/WEB-INF/task-flow-definition.xml#task-flow-definition";
    private String taskFlowId = START_TASK_FLOW;
    private UIState state;

    public TestTFNavigationBean() {
    }

    public TaskFlowId getDynamicTaskFlowId() {
        return TaskFlowId.parse(state.getTaskFlowId());
    }

    public String taskflowdefinition() {
        state.setTaskFlowId(START_TASK_FLOW);
        taskFlowId = START_TASK_FLOW;
        return null;
    }

    public String taskflowdefinition2() {
        state.setTaskFlowId("/WEB-INF/task-flow-definition2.xml#task-flow-definition2");
        taskFlowId =
                "/WEB-INF/task-flow-definition2.xml#task-flow-definition2";
        return null;
    }


    public void setState(UIState state) {
        this.state = state;
    }
}
